Systems and methods for advanced monitoring and control using an led driver in an optical processor

ABSTRACT

Systems and methods for advanced monitoring and control using an LED driver in an optical processor are described. In an embodiment, a monitoring and control circuit may include a light-emitting diode (LED) driver including a control input, an output, and a node, wherein the output is coupled to an LED. The circuit may also include a multiplexer coupled to the node of the LED driver, an analog-to-digital converter coupled to the multiplexer, and a controller coupled to the analog-to-digital converter and to the control input of the LED driver, wherein the LED driver is coupled to drive the output with a first voltage supply that is independent from a second voltage supply that is coupled to drive the controller.

CROSS REFERENCE TO RELATED APPLICATIONS

This disclosure is related and claims priority to U.S. PatentProvisional Application No. 61/323,798, entitled “APPARATUS WITH OPTICALFUNCTIONALITY AND ASSOCIATED METHODS” filed on Apr. 13, 2010, which ishereby incorporated by reference in its entirety.

BACKGROUND

1. Field of the Invention

This disclosure relates to optical sensors, and, more particularly, tosystems and methods for advanced monitoring and control in an opticalprocessor using an LED driver.

2. Description of the Related Art

An optical sensor is a device capable of converting light—visible orotherwise—into electrical signals. Optical sensors may be employed invarious applications, including, for example, ambient light sensing,touchless human interfaces, etc.

A typical optical sensor may include at least one photodetector forreceiving a light signal. In some applications, it may also include alight emitting diode (LED) for emitting a light signal. In certain modesof operation, an optical sensor may emit a signal using its LED, measurea reflection of the emitted signal with its photodiode, and then comparethe emitted and received signals. For example, the comparison may bebased on a difference of intensity, time, and/or phase between thesignals. Depending on its configuration, the optical sensor IC may thenbe able to determine the identity of an object located near the sensor,its distance from the sensor, its direction of movement with respect tothe sensor, etc.

SUMMARY

Systems and methods for advanced monitoring and control using an LEDdriver in an optical processor are described. In an embodiment, amonitoring and control circuit may include a light-emitting diode (LED)driver including a control input, an output, and a node, wherein theoutput is coupled to an LED. The circuit may also include a multiplexercoupled to the node of the LED driver, an analog-to-digital convertercoupled to the multiplexer, and a controller coupled to theanalog-to-digital converter and to the control input of the LED driver.The LED driver is coupled to drive the output with a first voltagesupply that is independent from a second voltage supply that is coupledto drive the controller.

An embodiment of an optical sensor system may include a host processorand an optical sensor coupled to the host processor. The optical sensormay include a first driver circuit including an input and an output,wherein the output is coupled to at least one electro-opticaltransducer. The optical sensor may also include a second driver circuitincluding an input, an output, and a node. The optical sensor mayfurther include a multiplexer circuit coupled to the node of the seconddriver circuit, an analog-to-digital converter circuit coupled to themultiplexer circuit, and a controller circuit coupled to theanalog-to-digital converter circuit, to the input of the first drivercircuit, and to the input of the second driver circuit.

An embodiment of a method may include measuring a voltage at a node of alight-emitting diode (LED) driver of an optical sensor, wherein the LEDdriver is connected to an LED via an output pin. The method may furtherinclude determining a voltage at the output pin based, at least in part,on the measured voltage, and modifying an electrical current level ofthe LED driver based, at least in part, on the determined voltage.

Another embodiment of a method may include measuring a voltage at a nodeof a light-emitting diode (LED) driver of an optical sensor, wherein theLED driver is connected to an LED via an output pin. The method may alsoinclude determining a voltage at the output pin based, at least in part,on the measured voltage, and calculating a device parameter based, atleast in part, on the determined voltage.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating a system incorporating an opticalsensor according to certain embodiments.

FIG. 2 is a diagram illustrating an monitoring and control circuitconfigured to implement advanced system monitoring and control using LEDdrivers according to certain embodiments.

FIG. 3 is a diagram illustrating an LED driver according to certainembodiments.

FIG. 4 is a circuit diagram illustrating an LED driver monitoring andcontrol circuit according to certain embodiments.

FIG. 5 is graph illustrating I-V curves of an LED driver according tocertain embodiments.

FIGS. 6A and 6B are flowcharts illustrating operations of an LED drivermonitoring and control circuit according to certain embodiments.

FIG. 7 is a circuit diagram illustrating another LED driver monitoringand control circuit according to certain embodiments.

FIG. 8 is a circuit diagram illustrating an LED driver configured toperform a battery discharge monitoring operation according to certainembodiments.

FIGS. 9A and 9B are circuit diagrams illustrating LED drivers configuredto act as a charge pump according to certain embodiments.

FIG. 10 is a circuit diagram illustrating an LED driver configured toact as a boost converter according to certain embodiments.

While being susceptible to various modifications and alternative forms,specific embodiments discussed in this specification are shown by way ofexample in the drawings and will herein be described in detail. Itshould be understood, however, that the drawings and detaileddescription are not intended to limit the disclosure to the particularform disclosed, but on the contrary, the intention is to cover allmodifications, equivalents and alternatives falling within the spiritand scope of the present disclosure as defined by the appended claims.

DETAILED DESCRIPTION

FIG. 1 is a diagram illustrating an embodiment of a system incorporatingLED drivers that may be configured for advanced monitoring and controlapplications, as described in greater detail below. In particular, theillustrated system may be configured to perform various types of opticalsensing. For example, distance to a nearby object 160 may be estimatedby transmitting infrared light from one or more light emitting diodes(LEDs) 135 and measuring the amount of infrared light reflected fromobject 160.

In the illustrated embodiment, system 100 includes a sensor integratedcircuit (IC) 120 coupled to a bank of one or more LEDs 135. As describedin greater detail below, IC 120 may include one or more LED driversconfigured to operate LEDs 135.

Additionally, in the illustrated embodiment, IC 120 includes a proximitysensor 150 and a memory 155. As discussed in greater detail below withrespect to FIGS. 2 and 4, in the embodiment of FIG. 1, the LEDs aredriven by a voltage source V_(BAT) that may be independent of thevoltage source V_(DD) that drives other system components. For example,V_(BAT) may correspond to a voltage driven directly from a battery orother source, whereas V_(DD) may correspond to a voltage generated by aregulator circuit. In some instances, V_(DD) might be derived fromV_(BAT).

In some embodiments, IC 120 may include, and/or may be coupled to, alow-power programmable controller, microcontroller, processor,microprocessor, field-programmable gate array (“FPGA”), or any othersuitable control circuit. For example, IC 120 may include or be coupledto one or more of integrated random-access memory (“RAM”), read-onlymemory (“ROM”), flash memory (or other non-volatile memory generally),one-time programmable (“OTP”) circuitry, analog-to-digital converters(“ADCs”), digital-to-analog-converters (“DACs”), counters, timers,input/output (“I/O”) circuitry and controllers, reference circuitry,clock and timing circuitry (including distribution circuitry),arithmetic circuitry (e.g., adders, subtractors, multipliers, dividers),general and programmable logic circuitry, power regulators, or the like.

System memory 155 within IC 120 represents an embodiment of acomputer-accessible or computer-readable storage medium configured tostore program instructions and data. In other embodiments, programinstructions and/or data may be received, sent or stored upon differenttypes of computer-accessible media. In general, a computer-accessiblemedium or storage medium may include any type of mass storage media ormemory media such as magnetic or optical media. A computer-accessiblemedium or storage medium may also include any volatile or non-volatilemedia such as RAM (e.g., SDRAM, DDR SDRAM, RDRAM, SRAM, etc.), ROM, orthe like, whether included in IC 120 as system memory 155 or anothertype of memory, such as a memory coupled to IC 120 or to a processor orcontroller external to IC 120. Program instructions and data stored viaa computer-accessible medium may be transmitted by transmission media orsignals such as electrical, electromagnetic, or digital signals, whichmay be conveyed via a communication medium such as a network and/or awireless link, such as may be implemented via any interface.

In one mode of operation, system 100 may detect ambient light using oneor more photodiodes sensitive to visible light and residing within orcoupled to IC 120. This mode of operation may be used, for example, inan application where the brightness of a display (or any other parameterassociated with any device connected to system 100) is controlled as afunction of detected ambient light. For instance, if there is sufficientambient light present during operation, then the brightness of thedisplay may be automatically reduced. In a dark environment wheredetected ambient light is deemed insufficient, the brightness of thedisplay may be increased.

In another mode of operation, one or more of LEDs 135 may be infraredLEDs such that infrared radiation emitted by LEDs 125 is reflected fromnearby object 160 and received at proximity detector 150. This mode ofoperation may be used, for example, to implement a touchless humaninterface or the like. For instance, if a mobile phone or deviceemploying system 100 is placed near a person's ear (i.e., an instance ofa nearby object 160), then proximity detector 150 may provide anindication that the screen should be temporarily turned off. Once theperson moves the device away, proximity detector 150 may determine thatthe screen should be turned back on.

In yet another mode of operation, system 100 may be employed toimplement gesture recognition. However, these modes of operation aredescribed for purposes of illustration only. It should be noted thatsystem 100 can be used for numerous purposes in a wide variety ofapplications. That is, system 100 is not limited to optical sensing, andit is contemplated that the LED driver embodiments discussed below maybe employed in any suitable type of system.

FIG. 2 is a diagram of a monitoring and control circuit 200 configuredto implement advanced system monitoring and control using LED driversaccording to certain embodiments. In some embodiments, circuit 200 maybe similar to those described in U.S. patent application Ser. No.12/650,738. And in some instances, circuit 200 may be used as orincluded within optical sensor IC 120 described in FIG. 1. However, asnoted above, an optical sensor is merely one illustrative example of acircuit that may perform monitoring and control using LED drivers. Thevarious LED driver circuit embodiments discussed below may be employedin any suitable monitoring and control circuit.

LED driver circuit 202 may be coupled to analog-to-digital converter(“ADC”) circuit 210 and may receive an LED strobe signal via line 224for controlling LED illumination. In some embodiments, LED drivercircuit 202 may receive as input one or more control or logic signals tocontrol the mode of the driver and/or its electrical current level. ADCcircuit 210 may include digital control circuitry 222 for operating ADC210. Signals from ADC 210 may be output over digital special functionregister (SFR) bus 226, although any other suitable bus may be used. Ananalog input may be provided to ADC 210 from analog multiplexer (“AMUX”)218. AMUX 218 may be controlled by digital control circuitry 222 and maybe connected to visible light photodiode 216, infrared (“IR”) photodiode214, temperature sensor 212, and/or one or more outputs of LED driver202, as discussed below. Visible light photodiode 216 and/or IRphotodiode 214 may form an optical sensing circuit.

As shown in FIG. 2, two different voltage supplies may be employed todrive different elements of monitoring and control circuit 200. In theillustrated embodiment, V_(DD) _(—) _(LED) is coupled to drive LED 206,whereas V_(DD) is coupled to drive other components such as the variouselements of ADC 210. As noted above with respect to FIG. 1, V_(DD) _(—)_(LED) may be configured as a voltage source that is independent ofV_(DD). For example, V_(DD) _(—) _(LED) may correspond to abattery-supplied voltage V_(BAT), whereas V_(DD) may correspond to aregulated supply voltage derived from V_(BAT).

The use of an LED voltage supply that is independent from the V_(DD)supply that drives the control circuitry of LED driver 202 may helpreduce the susceptibility of monitoring and control circuit 200 to thepathological circuit phenomenon known as “latch-up.” Generally speaking,the potential for latch-up arises as an unwanted consequence ofparasitic circuit elements that occur within CMOS devices. For example,the contacts between N-type and P-type regions may create parasitictransistors coupled in a way that creates a parasitic silicon controlledrectifier (SCR). If triggered, this parasitic SCR may create apositive-feedback loop in which a high amount of current flowscontinuously through the device, typically until the device isdepowered. Often, the high currents resulting from latch-up aresufficient to destroy a CMOS device.

The parasitic SCR may be triggered if a supply voltage fallssufficiently below a control input voltage (e.g., a voltage applied to aMOSFET gate as an I/O input), or conversely if the control input voltagerises sufficiently above the supply voltage. These conditions may arise,for example, due to spikes or transients in system operation, such asmight arise due to the switching of substantial loads, electrostaticdischarge (ESD) events, or improper sequencing of different powersupplies (e.g., allowing differently-controlled power supplies to activeor deactivate in a sequence that causes the SCR-triggering configurationof voltages to occur).

In the embodiment of monitoring and control circuit 200 shown in FIG. 2,driving the output device(s) (e.g., LEDs 204, 206) that are coupled toLED driver circuit 202 with independent supply V_(DD) _(—) _(LED)instead of supply V_(DD) may reduce the likelihood that latch-up mayoccur. In some embodiments, V_(DD) may be derived from V_(DD) _(—)_(LED), for example through a voltage regulator circuit. In suchembodiments, V_(DD) may generally be lower than V_(DD) _(—) _(LED)(e.g., typically by at least the voltage drop across a diode in thevoltage regulator circuit). By driving the output devices coupled to LEDdriver circuit 202 using the higher V_(DD) _(—) _(LED) supply, thelikelihood of the control input voltage to LED driver 202 exceeding thedriver's supply voltage (and possibly triggering latch-up) may bereduced.

Also, if V_(DD) is derived from V_(DD) _(—) _(LED), the configuration ofmonitoring and control circuit 200 that is shown in FIG. 2 may exhibitreduced sensitivity to latch-up arising from sequencing issues. Forexample, if V_(DD) _(—) _(LED) is driven directly from a higher-voltagesource such as a battery, and if V_(DD) is a regulated, lower-voltageversion of the higher-voltage source, then under normal power-upcircumstances, it may be practically impossible for V_(DD) to develop ahigher voltage than V_(DD) _(—) _(LED). Accordingly, it may beunnecessary to synchronize the activation or deactivation of V_(DD) _(—)_(LED) with other supplies in order to prevent latch-up. It is notedthat in some embodiments, the actual voltage value driven at the outputof LED driver 202 at a given time may be any suitable value (includingvalues that may be higher or lower than V_(DD)), depending on thecharacteristics of the load coupled to LED driver 202 and the currentselected to be driven through that load.

In some embodiments, in addition to or instead of using digital controlcircuitry 222, circuit 200 may be interconnected with an externalcontroller (not shown) that may be programmable to coordinate theoperation of various blocks within circuit 200. Such a controller may bethe same as or distinct from a controller that coordinates operation ofa system in which circuit 200 is included. That is, circuit 200 may becoupled to a dedicated external controller, or may share a controllerthat also performs other functions. Generally speaking, the operation ofcircuit 200 may be controlled by stored instructions executed by aprocessor, by hardwired state machines, or by any other suitable controltechnique.

LED driver circuit 202 may include a plurality of LED driver elements(“LED drivers”). Ordinarily, each LED driver would have an output pin,and that output pin would be connected to one LED such as LED 204(corresponding, for example, to one of LEDs 135 of FIG. 1). As such, anLED driver within LED driver circuit 202 may have its single output 203coupled to LED 204 and configured to drive LED 204. In some embodiments,however, LED driver circuit 202 may further include one or more LEDdrivers that have output monitoring and control node 208 in addition tooutput 205 coupled to LED 206 and operable to drive LED 206. Outputmonitoring and control node 208 may be configured to enable input oroutput—depending upon its mode of operation—as described in more detailbelow. For example, in certain embodiments, output monitoring andcontrol node 208 may provide an output signal to ADC 210 when operatingin active mode. In such embodiments, output monitoring and control node208 may be implemented as a protected low-voltage node, for example inorder to protect ADC 210 from excessive input voltages. It iscontemplated that in some embodiments, LED driver circuit 202 may beconfigurable such that during different modes of operation, it mayoperate as a programmable current source or as a programmable currentsink, for example via output monitoring and control node 208 and/or viaoutputs 203 or 205, or via other outputs not shown here.

In operation, circuit 200 may be configured to drive LEDs 204 and 206 inresponse to control signals from an external host microprocessor.Moreover, circuit 200 may be configured to measure temperature (e.g.,using temperature sensor 212), ambient light (e.g., using visible lightphotodiode 216), and/or act as an optical signal receiver of radiationemitted by LEDs 204 and/or 206 controlled by LED driver circuit 202(e.g., using IR photodiode 214). The LED current level may beprogrammable to provide different illumination levels for differentdetection and/or measurement ranges. In some embodiments, two or moreLEDs may be driven, depending upon the complexity of proximity, distancemeasurement, motion detection and/or gesture recognition beingperformed. In other embodiments, however, any other number of LEDs maybe used.

In some embodiments, one or more elements of LED driver circuit 202 maybe configured to enable analog and/or digital I/O on the same packagepins. This in turn may enable programming access and/or debug andmanufacturing test access through the LED driver itself. LED drivercircuit 202 may also enable additional system-level functions describedherein. For example, a main I/O function—i.e., LED driver output—may bemultiplexed with supplemental functions, such as bidirectionalcurrent/voltage source, DAC output, ADC input, etc.

In some applications, an LED output may be active during a limitedperiod of time. For example, an LED output might be active duringparticular modes of operation, or a certain fraction of an interval oftime (such as in time-division multiplexed operation). In suchapplications, a particular LED driver element of LED driver circuit 202may be used as an LED GPIO for other functionality during periods of LEDdriver inactivity. In other embodiments, one or more LED driver elementsmay be repurposed to perform other operations as their primary function,which may vary depending on programming and/or external conditions(e.g., automatic detection of the presence of LEDs, external sensorinput, servo control output, etc.).

This supplemental analog I/O mode function allows interfacing externalsensors or electrical quantities (e.g., voltage, charge, current, etc.)to ADC 210 in order to perform other measurements (e.g., humidity, PIR,temperature, light, capacitance, etc.). In combination with theflexibility of NVM programming, various types of sensors may beimplemented. In some embodiments, an external pin configuration (e.g.,type of sensor, attached device ID, or measured electrical quantity) maybe detected by a host controller and/or sequence control processing core228, and the host controller and/or sequence control processing core 228may execute code stored in NVM specific to the detected externalconfiguration. In other embodiments, an LED driver pin may outputprogrammable current and voltage in two polarities. Furthermore, the LEDdriver may be configured to operate simultaneously in a combination offunctional modes. For example, an LED current may be turned on with theanalog input active so the pin voltage may be measured internally by ADC210.

FIG. 3 is a diagram illustrating an LED driver according to certainembodiments. In some embodiments, LED driver 300 may be configured asdescribed in U.S. patent application Ser. No. 12/650,738, entitled“HIGH-VOLTAGE CONSTANT-CURRENT LED DRIVER FOR OPTICAL PROCESSOR” filedon Dec. 31, 2009, which is hereby incorporated by reference in itsentirety. And in some instances, LED driver 300 may be used as anelement within LED driver circuit 202 of FIG. 2.

As illustrated in FIG. 3, in addition to output 205 (ordinarily used fordriving an LED), LED driver 300 includes output monitoring and controlnode 208. In some embodiments, output monitoring and control node 208may be connected to ADC 210 and/or may be operable to pass an analogquantity to or from output 205. Depending on its configuration, outputmonitoring and control node 208 may serve as an output or as input. Inthe particular embodiment discussed below, output monitoring and controlnode 208 is an internal protected low-voltage node.

In some embodiments, LED driver 300 may include an adaptively regulatedcascode current source to enable high-voltage operation. The currentsource may include a stacked pair of transistors including firstN-channel transistor 305 and second N-channel transistor 310. Transistor305 may have its drain connected to output 205 and its source connectedto output monitoring and control node 208. Transistor 310 may have itsdrain connected to output monitoring and control node 208 and its sourceconnected to ground. The gate of transistor 305 may be connected tobiasing circuitry 315. The gate of transistor 310 may be connected tocurrent mirror control circuit 320 and ESD protection circuitry 325. Thegate of transistor 310 may also be connected to input driver 330, whichmay provide an input signal to LED driver 300 through node 335.

As seen in FIG. 3, LED driver 300 may include a two-transistor stackincluding transistor 305 and transistor 310. In operation, transistor310 may set an accurate current level for LED operation, whiletransistor 305 may provide voltage protection for transistor 310 andoutput impedance for LED driver 300. The bias voltage of transistor 305may be dynamically controlled based upon the mode of operation of LEDdriver 300.

In some embodiments, LED driver 300 may have at least three modes ofoperation: active (or “LED on” mode), inactive (or “LED off” mode), andGPIO. In a non-limiting example, when LED driver 300 is in active mode,the LED driver circuitry may be active to drive an LED through output205, and both transistors 305 and 310 may be turned on. When LED driver300 is in inactive mode, both transistors 305 and 310 may be turned off.And when LED driver 300 is in GPIO mode, transistor 305 may be turned onwhereas transistor 310 may be turned off. In some embodiments, output205 may be connected to a first pin or terminal and output monitoringand control node 208 may be connected to a second pin or terminal. Thefirst pin may be configured to drive an LED, whereas the second pin maybe connected to an ADC, DAC, voltage source, current source, etc. toenable advanced monitoring and control using LED driver 300.

Referring now to FIG. 4, a circuit diagram illustrating an LED drivermonitoring and control circuit is depicted according to certainembodiments. Control block 405 may be coupled to LED driver 300 and mayinclude one or more control blocks within circuit 200 of FIG. 2 such as,for example, sequence control processing core 228, register map 230,etc. LED driver 300 may be such as the one shown in FIG. 3, and it maybe coupled to LED 206 via first pin 205. LED driver 300 may also becoupled to ADC block 210 via second pin 208. ADC block 210 may such asthe one described with respect to with FIG. 2, and it may be coupled tocontrol block 405.

In the illustrated embodiment, the output device coupled to LED driver300 (i.e., LED 206) is driven by supply V_(DD) _(—) _(LED), whereascontrol block 405 and ADC block 210 are driven by supply V_(DD). Asdiscussed above with respect to FIG. 2, V_(DD) _(—) _(LED) may beimplemented as a supply that is independent of V_(DD) (e.g., V_(DD) _(—)_(LED) may be supplied directly by a battery, whereas V_(DD) may begenerated by a voltage regulator). As previously noted, this type ofsupply configuration may reduce the latch-up susceptibility of LEDdriver 300.

In an embodiment, LED driver 300 may operate in active mode by drivingLED 206, for example, during a proximity detection operation of circuit400. Because the voltage drop across transistor 305 is known, thevoltage at second pin 208 may be used to determine V_(LED)—i.e., thevoltage across LED 206—as in a voltage divider. The voltage at secondterminal 208 is fed into ADC 210 and passed on to control block 405,which in turn may determine V_(LED). Based on V_(LED), control block 405may control and/or correct the operation of LED driver 300. For example,control block 405 may control LED driver 300 to maintain a constantoutput current through LED 206, or to stabilize and control the outputcurrent as described in greater detail below. Additionally oralternatively, control block 405 may determine an LED temperature and/orlife status parameter. These parameters may be used, for example, toindicate the accuracy of a proximity operation and/or self-test.

In one non-limiting example, circuit 400 may be employed to perform LEDstatus monitoring. For instance, by measuring the voltage drop acrossLED 206 and/or simultaneously driving LED 206 within a known current,control block 405 may determine an LED life status parameter such as,for example, LED damage, nearing end-of-life, parametric shift, etc.These determinations may be based on a table and/or formula. In anembodiment, control block 405 may set LED driver to inactive mode andthen measure at least two values for V_(LED), each value correspondingto a different driving current. In other embodiments, however, at leastone of the at least two measurements may alternatively be taken inactive mode. Control circuit 405 may then generate an I-V (currentversus voltage) curve for LED 206, and thus make LED life statusparameter determinations.

In another non-limiting example, circuit 300 may be used to perform LEDtemperature monitoring. Particularly, LED temperature monitoring may becorrelated to V_(LED) when LED 206 is driven at a constant current. Thisembodiment may apply to diodes of any technology, because in general,Boltzmann V_(T) temperature is independent or substantially independentas long as the difference in voltage drop across the diode's internalresistance at two measuring currents is significantly less than theV_(T) value. In an embodiment, control block 405 may take three currentmeasurements, and therefore may obtain both a value of V_(T) and theinternal resistance of LED 206. In alternative embodiments, instead ofLED 206, circuit 400 may measure the value of a temperature-dependentresistor having either a negative or positive temperature coefficient.

In yet another non-limiting example, circuit 400 may perform a procedurefor compensating supply voltage variation when in active mode. Thisprocedure may be explained with reference to FIG. 5. Particularly, FIG.5 shows graph 500 illustrating simulated I-V curves (solid lines) of LEDdriver 300 at various programmed current levels I_(LED1), I_(LED2),I_(LED3), and I_(LED4) and simulated I-V curves of LED 206 (dottedlines) with different supply voltages. V_(LEDA) and V_(LEDB) arevoltages at the LED driver output 205. Assume, for example, that LEDdriver 300 is set to operate at current level I_(LED2). At this level,the lowest possible V_(LED) value that produces an approximately linearresponse from LED 206 is V_(LEDA) (shown by point A in chart 500). Ifthe voltage provided to LED 206 drops, then, absent some form ofcorrection, the system may find itself inadvertently operating at pointA′ (“A prime”) in chart 500, which may result in substantially lowerI_(LED) than I_(LED1) and yield unreliable proximity measurements.Accordingly, in some embodiments, when circuit 400 detects that V_(LED)has dropped to a voltage below V_(LEDA), control block 405 may increasethe electrical current level of LED driver 300 from I_(LED2) to I_(LED3)(point B in chart 500), thus resulting in a more accurate I_(LED) andmore reliable proximity measurement. After V_(LED) has been restored toa value above V_(LEDA), then LED driver 300 may return to its originalcurrent level I_(LED2) or it may continue operating at its presentlevel.

This supply voltage compensation procedure may allow control block 405to determine which current level LED driver 300 can reliably operate inbased on measurements made with LED driver 300 itself. Control block 405may therefore adjust the current level up or down dynamically inresponse to changes in V_(LED) and/or supply voltage.

The operations described above may be further illustrated with respectto FIG. 6. Specifically, FIG. 6A is a flowchart illustrating a method ofoperation 600 of LED driver monitoring and control circuit 400 accordingto certain embodiments. At 605, circuit 400 may activate a proximityLED. At 610, control block 405 may measure V_(LED) when LED driver 300is in active mode. If at 615 control block 405 determines that V_(LED)is greater than a minimum value (V_(LED) _(—) _(min)), then at 620control block 405 may start a proximity cycle. In some embodiments, ifV_(LED) is the same as V_(LED) _(—) _(min) and if V_(LED) _(—) _(min) isdetermined to produce a linear response, then control block 405 may alsoconsider the data obtained to be valid. However, if at 615 control block405 determines that V_(LED) is smaller than V_(LED) _(—) _(min), then at625 control block 405 may increase the current level of LED driver 300(i.e., I_(LED)) to compensate for a possible drop in LED voltage supply,indicate that the original proximity measurement is invalid, and/orretake the proximity measurement by returning to operation 605.

FIG. 6B is another flowchart illustrating an alternative method ofoperation 630 of monitoring and control circuit 400 according to certainembodiments. In this example, if V_(LED) is determined be greater thanV_(LED) _(—) _(min), then at 650 proximity data is considered valid. Onthe other hand, if V_(LED) is smaller than V_(LED) _(—) _(min), then at655 control circuit 400 may adjust the resulting proximity dataaccording to a pre-defined table or the like. Additionally oralternatively, control circuit 400 may adjust proximity data accordingto a mathematical formula. In either case, at 650 proximity data is alsoconsidered valid.

FIG. 7 is a circuit diagram illustrating another LED driver monitoringand control circuit according to certain embodiments. Circuit 700 may beused as an alternative to circuit 400 of FIG. 4 when LED driver circuit202 of FIG. 2 includes more LED drivers than are necessary to drive agiven number of LEDs. In this instance, LED driver 705 may include atwo-transistor stack including transistor 710 and transistor 715, butone output at the drain of transistor 710 is connected to the cathode ofLED 206. Moreover, LED driver 300 may be “repurposed” to measure V_(LED)by having output 205 connected to the cathode of LED 206 and secondoutput 208 connected to ADC 210. Although functionally similar tocircuit 400 of FIG. 4, circuit 700 may provide, at least in someinstances, a more accurate measure of V_(LED) due to the use of adedicated measurement driver.

FIG. 8 is a circuit diagram illustrating an LED driver configured toperform a battery discharge monitoring operation according to certainembodiments. Circuit 800 is similar to circuit 700 of FIG. 7, but it hasbattery 805 powering LED 206, and output 205 of LED driver 300 coupledto battery 805. As such, output monitoring and control node 208 may beconfigured to measure the voltage of battery 805. In an embodiment, whenLED driver 705 is in inactive mode, LED driver 300 may be in GPIO modeand thus measure the voltage available to LED 206 without any load.Subsequently, LED driver 705 may enter its active mode and drive LED 206with a known current—thus applying a known load level to battery805—while LED driver 300 measures any voltage drop associated with thatknown load. If, for instance, the voltage drop is above a thresholdvalue, control circuit 405 may discard a proximity measurement takenduring the prior active state.

Typically, battery systems such as battery 805 have a relatively flatdischarge curve, which may make it difficult to determine remainingbattery charge from the terminal voltage of the battery. Also, batteryimpedance usually increases with the depth of the discharge level.Furthermore, battery impedance tends to increase with age, typicallyshortening battery capacity under discharge. In some embodiments, byimpulse loading the battery with a discharge rate similar to the peakloading, control circuit 405 can make a more accurate measure ofremaining battery capacity or peak loading near end-of-life.

FIG. 9A is a circuit diagram illustrating an LED driver configured toact as a charge pump according to certain embodiments. Circuit 900 issimilar to circuit 800 of FIG. 8, but it has capacitor 905 and resistor910 in a parallel configuration connected to LED 206 and to output 205of LED driver 300. In some embodiments, circuit 900 may charge capacitor905 in a first stage, where LED driver 300 is inactive and LED driver705 is in GPIO mode. Then, in a second stage, a proximity measurementmay be taken. In this second stage, circuit 900 may drive LED 206 withLED driver 300 in active mode and LED driver 705 inactive, thus allowingLED 206 to use the energy stored in capacitor 905 in addition to thatprovided by battery 805. In this manner, circuit 900 may allow LED 206to operate with a voltage that is higher than the voltage of battery805.

FIG. 9B is another circuit diagram illustrating an LED driver configuredto implement a charge pump according to certain embodiments. Asillustrated, LED driver 970 operates in GPIO mode and is configured tocontrol switches 925 (through inverter 930) and 935. Resistor 945 andcapacitor 940 are optional components that enable decoupling fromV_(BAT) provided by battery 805. In a first stage, LED driver 970 turnsswitch 925 off and switch 935 on. Also, LED driver 965 is disabled andLED driver 705 is enabled, thus causing the voltage across capacitor 960to increase to approximately the difference between the voltage ofbattery 805 (V_(BAT)) and the voltage drop across LED 206 (V_(LED)).Then, in a second stage, LED driver 970 turns switch 925 on and switch935 off. At this point, LED driver 965 is enabled and drives LED 206 inproximity mode. Therefore, similarly as described above with respect toFIG. 9A, circuit 900B allows LED 206 to operate with a voltage that ishigher than the voltage of battery 805.

FIG. 10 is a circuit diagram illustrating an LED driver configured toact as a boost converter (which may also be referred to as a DC-DCconverter) according to certain embodiments. Circuit 1000 has the outputof LED driver 705 coupled to inductor 1005 and to the anode of diode1010. Inductor 1005 is coupled to battery 805 and to LED 206. Theconfiguration of LED driver 300 is otherwise similar to that describedwith respect to FIG. 9 above. The cathode of diode 1010 is coupled tocapacitor 905 and load 1015. As such, LED driver 705 may be “repurposed”to drive load 1015.

Still referring to FIG. 10, a DC-DC up converter may be implemented bycircuit 1000 with LED driver 705 driven at a given frequency and dutycycle, and coupled to the external components shown above to form abooster converter. In some embodiments, another LED driver (not shown)may be used to monitor the output voltage of the DC-DC converter. Forexample, a DC-DC converter can be configured as an LED driver with aconstant current load, a speaker driver, etc.

As previously discussed, several functions may be implemented assoftware code in non-volatile memory. Non-volatile memory may beconfigured to store instructions and data accessible by a host processor(e.g., MCU 105 of FIG. 1) and/or a control circuit (e.g., sequencecontrol processing core 228 of FIG. 2).

In some embodiments, systems and methods for advanced monitoring andcontrol using an LED driver may enable multiplexing of functions on asingle (or reduced number of) pin(s). These systems and methods may findapplication, for example, in an optical processor. Generally speaking,as circuits become smaller, the number of pins available for dedicatedI/O is reduced. Particularly in the case of optical processors, thesedevices are often enclosed in a clear and tiny package so that they maybe placed on the edge of a printed circuit board to be able to “peerout” an optical window of the end product (e.g., a mobile phone). Due tothese and other small packaging restrictions—e.g., small packaging mayalso be less reliable due to differences in thermal coefficients, etc.—alow pin count device may be used.

The structures and techniques described above need not be limited in anyway to optical sensors. Rather, other systems and sensors may be builtbased on principles described herein. Examples of other such systemsinclude, but are not limited to: passive infrared (PIR) sensor; smoke orgas alarm sensor; color sensor; oximeter; glucose sensor; heart-ratesensor; medical diagnostics sensor; turbidity sensor; optical lightswitch; rain, ice or snow sensor; position encoder; photo interrupter;gesture sensor; capacitive, resistive touch or position sensor; daylightsensor; optical communication transceiver; remote controlreceiver/transmitter; optical isolator; synchronous array or sensors;etc.

Although the embodiments above have been described in considerabledetail, numerous variations and modifications will become apparent tothose skilled in the art once the specification is fully appreciated. Itis intended that the following claims be interpreted to embrace all suchvariations and modifications.

1. A monitoring and control circuit comprising: a light-emitting diode(LED) driver including a control input, an output, and a node, whereinthe output is coupled to an LED; a multiplexer coupled to the node ofthe LED driver; an analog-to-digital converter coupled to themultiplexer; and a controller coupled to the analog-to-digital converterand to the control input of the LED driver, wherein the LED driver iscoupled to drive the output with a first voltage supply that isindependent from a second voltage supply that is coupled to drive thecontroller.
 2. The circuit of claim 1, wherein the LED driver comprisesa voltage protection transistor in series with a current settingtransistor, wherein the output of the LED driver is coupled to a drainof the voltage protection transistor, wherein the node of the LED driveris coupled to a drain of the current setting transistor, wherein the LEDdriver is operable to drive a programmable constant current through theLED, and wherein the node is not accessible for input or output by adevice external to the monitoring and control circuit.
 3. The circuit ofclaim 2, wherein the controller is operable to determine a voltage atthe output of the LED driver based, at least in part, on a voltagemeasured at the node of the LED driver.
 4. The circuit of claim 3,wherein the controller is operable to take an optical proximitymeasurement at a constant current driven through the LED, and whereinthe controller is operable to determine whether the proximitymeasurement is valid based, at least in part, on the determined voltage.5. The circuit of claim 4, wherein in response to determining that theproximity measurement is not valid, the controller is operable to adjustthe proximity measurement dependent upon the determined voltage.
 6. Thecircuit of claim 3, wherein the controller is operable to adjust anelectrical current level of the LED driver based, at least in part, onthe determined voltage.
 7. The circuit of claim 3, wherein thecontroller is operable to determine a parameter associated with the LEDbased, at least in part, on the determined voltage, wherein theparameter includes one or more of an LED temperature or a LED lifestatus parameter.
 8. The circuit of claim 1, wherein the first voltagesupply is received from a battery, and wherein the second voltage supplyis a voltage-regulated version of the first voltage supply.
 9. Anoptical sensor system comprising: a host processor; and an opticalsensor coupled to the host processor, the optical sensor including: afirst driver circuit including an input and an output, wherein theoutput is coupled to at least one electro-optical transducer; a seconddriver circuit including an input, an output, and a node; a multiplexercircuit coupled to the node of the second driver circuit; ananalog-to-digital converter circuit coupled to the multiplexer circuit;and a controller circuit coupled to the analog-to-digital convertercircuit, to the input of the first driver circuit, and to the input ofthe second driver circuit.
 10. The system of claim 9, wherein the seconddriver circuit comprises a voltage protection transistor in series witha current setting transistor, and wherein the output of the seconddriver circuit is coupled to a drain of the voltage protectiontransistor and the node of the second driver circuit is coupled to adrain of the current setting transistor.
 11. The system of claim 10,wherein the output of the first driver circuit and the output of thesecond driver circuit are coupled to a cathode of the at least oneelectro-optical transducer.
 12. The system of claim 11, wherein thecontroller circuit is operable to determine a voltage at the output ofthe second driver circuit based, at least in part, on a voltage measuredat the node of the second driver circuit; and to adjust an electricalcurrent level of the first driver circuit in response to the determinedvoltage.
 13. The system of claim 11, wherein the controller circuit isoperable to determine a voltage at the output of the second drivercircuit based, at least in part, on a voltage measured at the node ofthe second driver circuit; and to determine a parameter associated withthe at least one electro-optical transducer in response to thedetermined voltage.
 14. The system of claim 10, wherein the output ofthe first driver circuit is coupled to a cathode of the at least oneelectro-optical transducer and the output of the second driver circuitis coupled to an anode of the at least one electro-optical transducer;wherein the system further comprises a battery coupled to the anode ofthe at least one electro-optical transducer; and wherein the controllercircuit is operable to determine a discharge level of the battery. 15.The system of claim 14, further comprising a voltage increasing circuitcoupled to the output of the second driver circuit, wherein the voltageincreasing circuit comprises either a boost converter or a charge pump,and wherein the voltage increasing circuit is operable to produce avoltage higher than a system supply voltage.
 16. A method comprising:measuring a voltage at a node of a light-emitting diode (LED) driver ofan optical sensor, wherein the LED driver is connected to an LED via anoutput pin; determining a voltage at the output pin based, at least inpart, on the measured voltage; and modifying an electrical current levelof the LED driver based, at least in part, on the determined voltage.17. The method of claim 16, wherein measuring comprises measuring withthe optical sensor.
 18. The method of claim 16, wherein modifying theelectrical current level comprises increasing the electrical currentlevel in response to the determined voltage indicating a non-linearresponse.
 19. A method comprising: measuring a voltage at a node of alight-emitting diode (LED) driver of an optical sensor, wherein the LEDdriver is connected to an LED via an output pin; determining a voltageat the output pin based, at least in part, on the measured voltage; andcalculating a device parameter based, at least in part, on thedetermined voltage.
 20. The method of claim 19, wherein the deviceparameter includes one or more of an LED temperature or an LED lifestatus parameter.
 21. The method of claim 18, wherein the deviceparameter is a battery discharge associated with a battery operable topower the LED.